package com.czxy.controller;

import com.czxy.domain.Classes;
import com.czxy.service.ClassesService;
import com.czxy.vo.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/class")
public class ClassesController {

    @Autowired
    private ClassesService classesService;

    @GetMapping("/all")
    public BaseResult findAll(){
        List<Classes> list = classesService.list();
        return BaseResult.ok(list);
    }



}
